program home;

uses
  Windows,
  Forms,
  homepage in 'homepage.pas' {frmHome};

{$R *.res}

var
  hAppMutex: THandle;

begin
  Application.Initialize;
  hAppMutex := CreateMutex(nil, false, PChar('YOYOHomePageMutex'));
  if (hAppMutex = 0) then exit;
  if ((hAppMutex <> 0) and (GetLastError() = ERROR_ALREADY_EXISTS)) then
  begin
    CloseHandle(hAppMutex);
    exit;
  end;

  if paramStr(1) <> 'yoyomessenger' then
    Application.Terminate
  else
    Application.CreateForm(TfrmHome, frmHome);
  Application.Run;
  CloseHandle(hAppMutex);
end.
